package NG::Gen::Users::Auth::Base;
use strict;
use warnings;
use utf8;

use NG::Sys::App;

sub make {
	my $class = shift;
	my $type = shift;
	my $record = shift;
	my $proto = app()->reference("auth_types")->get_by_key($type);
	unless($proto){
		die "cannot find proto for ".$type;
	}
	my $package = "NG::Gen::Users::Auth::".$proto->{class};
	Extend::_soft_require($package);
	return $package->new($proto,$record);
}

sub new {
	my $class = shift;
	my $proto = shift;
	my $record = shift;
	my $self = bless {
		proto => $proto,
		record => $record,
	},$class;
	return $self;
}
sub check {
	my $self = shift;
	my $data = shift;
	return 0;
}
sub create {
	my $self = shift;
}
1;
